﻿<phone:PhoneApplicationPage xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls" 
    x:Class="wpTTS_Demo.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768" 
    
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True" xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit">

    <!--Data context is set to sample data above and LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <ImageBrush ImageSource="/wpTTS%20Demo;component/BGround.jpg" />
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="WP TTS Demo" Style="{StaticResource PhoneTextNormalStyle}"/>
        </StackPanel>

        <!--ContentPanel contains ListBox and ListBox ItemTemplate. Place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <controls:Pivot Name="pivotMain">
                <controls:PivotItem Header="TTS">
                    <StackPanel>
                        <TextBlock Height="30" Name="txtSpeech" Text="Enter text below to speak:" />
                        <TextBox Name="textSpeechText" Text="" TextWrapping="Wrap" Height="210" />
                        <TextBlock Height="30" Name="txtPickLanguage" Text="Pick a voice:" />
                        <toolkit:ListPicker Name="lstVoices" />
                        <Button Content="Speak" Height="71" Name="btnSpeak" Width="200" Click="btnSpeak_Click" />
                        <Button Content="Translate It" Height="71" Name="btnTranslateIt" Width="199" Click="btnTranslateIt_Click" />
                    </StackPanel>
                </controls:PivotItem>
                <controls:PivotItem  Header="Translate">
                    <StackPanel>
                        <TextBlock Height="30" Name="txtTranslateFrom" Text="Translate from:" />
                        <toolkit:ListPicker Name="lstTranslateFrom" />
                        <TextBox Name="textTranslateFrom" Text="" TextWrapping="Wrap" Height="120" />
                        <TextBlock Height="30" Name="txtTranslateTo" Text="Translate to:" />
                        <toolkit:ListPicker Name="lstTranslateTo" />
                        <TextBox Name="textTranslateTo" Text="" TextWrapping="Wrap" Height="120" />
                        <Button Content="Translate" Height="71" Name="btnTranslate" Width="160" Click="btnTranslate_Click" Margin="0,0,200,0" />
                        <Button Content="Speak It" Height="71" Name="btnSpeakIt" Width="160" Margin="200,-71,0,0" Click="btnSpeakIt_Click" />
                    </StackPanel>
                </controls:PivotItem>
            </controls:Pivot>
            
        </Grid>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>